#ifndef VKIMPLATFORMINPUTCONTEXT_H
#define VKIMPLATFORMINPUTCONTEXT_H

#include <qpa/qplatforminputcontext.h>
#include "keyboard.h"
#include <QWindow>
#include <QDesktopWidget>

enum caiImQuery
{
    caiIM_REGEXP = 1,
    caiIM_END
};

class caiImPlatformInputContextPrivate
{
public:
    caiImPlatformInputContextPrivate();
    ~caiImPlatformInputContextPrivate();

    KeyBoard* m_pKeyBoard;
};

//class caiImPlatformInputContextPrivate;
class caiImPlatformInputContext : public QPlatformInputContext
{
    Q_OBJECT
public:
    caiImPlatformInputContext();
    ~caiImPlatformInputContext();

public:
    bool isValid() const Q_DECL_OVERRIDE;
    void setFocusObject(QObject *object) Q_DECL_OVERRIDE;

    void showInputPanel() Q_DECL_OVERRIDE;
    void hideInputPanel() Q_DECL_OVERRIDE;
    bool isInputPanelVisible() const Q_DECL_OVERRIDE;
    bool eventFilter(QObject *watched, QEvent *event);

public slots:
    void sendEvent(QEvent* evnet);
    void keyboardCommit(QString str);

private:
    QObject *m_focusObject;
    QWindow *m_pFocusWindow;

    static caiImPlatformInputContextPrivate* context;
};



#endif // VKIMPLATFORMINPUTCONTEXT_H
